home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!xmission!news
- From: Larry C Sanders <sanders@xmission.com>
- Newsgroups: comp.lang.c++
- Subject: Borland 4.5 -- WARN macro works in DOS but not Windows???
- Date: Thu, 25 Jan 1996 15:29:24 -0800
- Organization: XMission Internet (801 539 0900)
- Message-ID: <31081254.39F2@xmission.com>
- NNTP-Posting-Host: parkc2.xmission.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
-
- Using a Borland 4.5 compiler I was surprised that the CHECK, TRACE, WARN
- ..etc
- macros do not work when compiled as an EasyWin executable.
-
- In the Borland 'Library Reference' it says "These macros can be used
- with Windows and DOS and ..."
-
- But for me -- no joy in the windows case. Can anyone help?
- Here is the test code:
-
- #include <stdio.h>
- #include <checks.h>
- #include <stdio.h>
- #include <checks.h>
- #include <assert.h>
-
- int main(){
- printf("Hello World\n");
- TRACE("Hello World");
- WARN(5 != 5, "Math is broken");
- WARN(5 != 7, "Math still works");
-
- printf("Goodbye World\n");
- assert(0);
-
- return(0);
- }
-
-
- Complile and run this as a dos.exe and see this output:
-
- Hello World
- Trace WARN.CPP 7:[Def] Hello World
- Warning WARN.CPP 9:[Def] Math still works
- Goodbye World
- Assertion failed: 0, file WARN.CPP, line 12
- abnormal program termination
-
-
- Complile and run this as a EasyWin.exe and see this output:
-
- Hello World
- Goodbye World
- Then a message dialog pops up with
- "Assertion failed: 0, file WARN.CPP, line 12"
- When you clear that, another pops up "abnormal program termination"
-
- What is missing is any indication that the TRACE or WARN statments
- executed.
-